﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using CapturarObjetos.Nucleo;
using CapturarObjetos.Objetos;

namespace CapturarObjetos.Objetos
{
    class Setas
    {
        Vector2 Posicao;
        Texture2D textura;
        Rectangle colisao;

        public Setas(Texture2D textura,Vector2 posicao)
           
        {
            this.Posicao = posicao;
            this.textura = textura;
            colisao = new Rectangle((int)this.Posicao.X, (int)this.Posicao.Y, textura.Width, textura.Height);
 
        }
        
        public bool MouseOver(Rectangle mouseColisao)
        {
            if(mouseColisao.Intersects(this.colisao))
            {
                return true;
            }
            
           return false;
        }

        public void Update(GameTime gameTime)
        {
            colisao = new Rectangle((int)this.Posicao.X, (int)this.Posicao.Y, textura.Width, textura.Height);
        }

        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(textura, Posicao, Color.White);
        }
       


    }
}
